#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;

ll n;

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (ll i = 1; i * i * i < n; i++) {
    if (n % i) continue;
    ll a = n - i * i * i;
    if (a % (3 * i)) continue;
    a /= 3 * i;
    ll b = i * i + 4 * a;
    ll c = sqrt(b);
    if (c * c != b) continue;
    ll x = (c - i);
    if (x % 2) continue;
    ll y = x / 2;
    x = y + i;
    cout << x << ' ' << y;
    return 0;
  }
  cout << -1;
  return 0;
}